home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / gcc / gcc261c.zoo / objects / NXStringTable.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-11-19  |  1.7 KB  |  55 lines

  1. /* Interface for Objective C NeXT-compatible NXStringTable object 
  2.    Copyright (C) 1993,1994 Free Software Foundation, Inc.
  3.  
  4.    Written by:  Adam Fedor <adam@bastille.rmnug.org>
  5.  
  6.    This file is part of the GNU Objective-C Collection library.
  7.  
  8.    This library is free software; you can redistribute it and/or
  9.    modify it under the terms of the GNU Library General Public
  10.    License as published by the Free Software Foundation; either
  11.    version 2 of the License, or (at your option) any later version.
  12.    
  13.    This library is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  16.    Library General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU Library General Public
  19.    License along with this library; if not, write to the Free
  20.    Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21. */ 
  22.  
  23. /*
  24.     StringTable.h - Hash table for strings in the NeXT StringTable style
  25.     
  26.     $Id: StringTable.h,v 1.3 1993,1994/12/27 21:43:54 fedor Exp $
  27. */
  28.  
  29. #ifndef __NXStringTable_h_INCLUDE_GNU
  30. #define __NXStringTable_h_INCLUDE_GNU
  31.  
  32. #include <objc/HashTable.h>
  33.  
  34. #define MAX_NXSTRINGTABLE_LENGTH    1024
  35.  
  36. @interface NXStringTable: HashTable
  37.  
  38. - init;
  39.     
  40. - (const char *)valueForStringKey:(const char *)aString;
  41.     
  42. - readFromStream:(FILE *)stream;
  43. - readFromFile:(const char *)fileName;
  44.  
  45. - writeToStream:(FILE *)stream;
  46. - writeToFile:(const char *)fileName;
  47.  
  48. @end
  49.  
  50. static inline const char *STRVAL(NXStringTable *table, const char *key) {
  51.     return [table valueForStringKey:key];
  52. }
  53.  
  54. #endif /* __NXStringTable_h_INCLUDE_GNU */
  55.